package main

import (
	"fmt"
	"math"
	"strconv"
	"unicode/utf8"
)

func main() {
	var a int = 456
	var b int = 123
	fmt.Println(a + b)
	fmt.Println(a - b)
	fmt.Println(a * b)
	fmt.Println(a / b)
	fmt.Println(float64(a) / float64(b))
	a++
	fmt.Println(a)
	b++
	fmt.Println(b)
	print(math.Abs(-1))
	String()
	Bytes()
}

func ExtrmeNum() {
	// math.MaxInt64
	// math.MinInt64
	// math.MaxUint64
	// byte
	// rune
}

func String() {
	fmt.Println("Hello go")
	fmt.Println(`yyyyyy
 xxxxxx`)
	fmt.Println("hello" + string(26361))
	fmt.Println(string(123))
	fmt.Println("hello" + strconv.Itoa(26361))
	fmt.Println(len("hello"))
	fmt.Println(utf8.RuneCountInString("hello你好"))
}

func Bytes() {
	var str string = "hello曹"
	var bs []byte = []byte(str)
	var str1 string = string(bs)
	fmt.Println(str1)
}

func Bool() {
	var a bool = true
	var b bool = false
	fmt.Println(a && b)
	fmt.Println(a || b)
	fmt.Println(!a)
	// 组合取反
	// !(a&&b) -> !a || !b
	// !(a||b) -> !a && !b

}
